home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 2666 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.6 KB

  1. Path: news.uh.edu!usenet
  2. From: Sensarn <txs53132@bayou.uh.edu>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Two Stupid Newbie Questions
  5. Date: 19 Jan 1996 00:34:53 GMT
  6. Organization: AEtna Insurance Agency
  7. Message-ID: <4dmovd$sqb@masala.cc.uh.edu>
  8. References: <4d9qc7$m8t@news.fsu.edu> <DLCF5y.6It@ricks.edu>
  9. NNTP-Posting-Host: sip-14259.public-dialups.uh.edu
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 1.1 (Windows; U; 16bit)
  14.  
  15. yourmail@ricks.edu (Your Name) wrote:
  16. >colvin@xi.cs.fsu.edu (Joshua Colvin) wrote:
  17. >
  18. >
  19. >
  20. >
  21. >>   Howdy all! Okay...quickees here:
  22. >> 
  23. >>     1) When I move an image around the screen I draw it in a position and
  24. >>        then replace it using putimage(blah, XOR_PUT); but this creates a
  25. >>        flickering effect. Is it becuase my computer's just too slow to make
  26. >>        the movement appear smooth, or is there a better way to move an image
  27. >>        around on the screen?
  28. >> 
  29. >>     2) When should I use malloc() as opposed to farmalloc() ?
  30. >> 
  31. >>Thanx. :)
  32. >> 
  33. >>Joshua Colvin
  34. >>colvin@cs.fsu.edu
  35. >
  36. >Hey Joshua,
  37. >
  38. >    I think you are out of luck when it comes to using putimage().
  39. >You might try loading the images into memory before displaying them.
  40. >
  41. >    If you are using c++ I wouldn't use malloc at all.  Use new()
  42. >instead.  It is much more efficient.
  43. >
  44. >j
  45. >
  46. Make your own sprite functions.  Accessing video memory is fast with 
  47. pointers (especially when you know what the source for the functions 
  48. are).  Lots of the premade functions aren't optimized at all.  As for 
  49. farmalloc, I use it all the time (I never use malloc).  This post is 
  50. replying to Joshua.
  51.  
  52.  
  53.